package com.zhuss.order.processor;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import com.zhuss.bean.bo.order.order.DeletePrefundBo;
import com.zhuss.common.AbstractProcessor;
import com.zhuss.common.Processor;
import com.zhuss.exception.DzcxException;
import com.zhuss.order.db.dao.ext.PrefundDao;
import com.zhuss.order.db.entity.Prefund;

/**
 * @description: 退款返回记录删除
 * @author: zhushanshuo
 * @create: Fri Jan 15 22:17:59 CST 2021
 **/
@Component("prefundDelete")
public class PrefundDelete extends AbstractProcessor<Object, DeletePrefundBo> implements Processor<Object, DeletePrefundBo> {

    @Autowired
    private PrefundDao prefundDao;
    
    @Autowired
	@Qualifier("prefundRead")
	private PrefundRead prefundRead;
    
    
    /**
     * 校验
     */
	@Override
    public void check(DeletePrefundBo bo) throws DzcxException {
    }
    
    /**
     * 操作方法
     */
    @Override
    public Object process(DeletePrefundBo param) throws DzcxException {
    	Long prefundId = param.getPrefundId();
    	
    	Prefund record = new Prefund();
    	record.setPrefundId(prefundId);
    	record.setDeleted(param.getDeleted());
    	
    	record.setModifierId(param.getConcurrentUserId());
    	record.setModifier(param.getConcurrentUserName());
    	record.setModifyTime(new Date());
    	prefundDao.delete(record);
        return null;
    }
    
    /**
     * 操作日志
     */
	@Override
	public Object log(DeletePrefundBo param) throws DzcxException {
    	return null;
	}
}
